package excercise;

public class ex_03 {

	public static void main(String[] args) {
	
		   //#15
		   char a,b;
		   a='b';
		   System.out.println(a);
		   b='c';
		   System.out.println(b);
		   a=b;
		   System.out.println(a);
		   
		   //#16
		   
		  
		   //a.int n = 1; k=2; int r=n;   if(k<n)r =k;
		   int n = 1; int k=2; int r=n;   if(k<n)r =k;
		   System.out.println(" k= "+k+" n= "+n+" r= "+r);
		   
		   //b. int n1=1; int k1=2; int r1;  
		   int n1=1; int k1=2; int r1;  
		   if(n1<k1)r1=k1; 
		   else r1=k1+n1;
		   System.out.println(" k1="+k1+" n1="+n1+" r1="+r1);

		   //c. int n2=1; int k2=3; int r2=k2;
		   int n2=1; int k2=3; int r2=k2;
		   if(r<k)n =r;
		   else k=n;
		   System.out.println(" k2="+k2+" n2="+n2+" r2="+r2);
		   
		   //d.int n3 =1; int k3 =2; int r3=3;
		   int n3 =1; int k3 =2; int r3=3;
		   if(r3<k3+n3)r3 =2*n3;
		   else k3=2*r3;
		   System.out.println(" k3="+k3+" n3="+n3+" r3="+r3);
		   
		   //#17
		   //a
		   int x=1; int y= 1; 
		   if(x-y==0) {x=1;y=1;}
		   //&&를 - 로바꾼다
		   
		   //b
		   int x1 =2;
		   if (1<= x1 && x1<=10) System.out.println(x1);
		   //조건문에 식을 중첩할떄 && 로 두개를 따로쓴다.
		   
		   //#18
		   int number = 30;
		   if (number%2==0){
			   System.out.println(number+"is even.");
		   }
		   else if(number%2==0){
			   System.out.println(number+"is odd.");
	} 
			int number1 = 35;
			if (number1%2==0)
			{
			   System.out.println(number1+"is even.");}
			else if (number1%2>=1){
			   System.out.println(number1+"is odd.");	   
			}
		   
		   
	}

}
